<?xml version="1.0" encoding="UTF-8"?>

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:t="http://myfaces.apache.org/tomahawk">
    
    <ui:composition template="/pages/user/templates/userAdminTemplate.xhtml">
        <ui:define name="pageTitle">
            <h:outputText value="Edit Role"/>
        </ui:define>
    
        <ui:define name="centerPane">
            <h:form>
                <h:panelGrid columns="2" rowClasses="topAlignedRow">
                    <h:outputLabel for="roleId">
                        <h:outputText value="#{msg['role.id.label']}"/>
                    </h:outputLabel>
                    <h:outputText id="roleId" value="#{updateRoleAction.role.roleId}"/>
                    
                    <h:outputLabel for="roleName">
                        <h:outputText value="#{msg['role.name.label']}"/>
                    </h:outputLabel>
                    <h:outputText id="roleName" value="#{updateRoleAction.role.roleName}"/>
                    
                    <h:outputLabel for="roleDesc">
                        <h:outputText value="#{msg['role.description.label']}"/>
                    </h:outputLabel>
                    <h:inputTextarea id="roleDesc" cols="30" rows="10" value="#{updateRoleAction.role.roleDescription}"/>         
                    
                    <h:outputText value=""/>
                    <h:panelGroup>           
                        <h:commandButton value="Save" action="#{updateRoleAction.save}"/>
                        <h:commandButton value="Cancel" action="gotoViewRoles" immediate="true"/>
                    </h:panelGroup>
                </h:panelGrid>
                <t:inputHidden value="#{updateRoleAction.roleId}" forceId="true" id="roleId"/>
            </h:form>
        </ui:define>
    </ui:composition>
    
</html>
